﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ItemsPopUp.aspx.cs" Inherits="logicunivesityinventorystore.Store.ItemsPopUp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta content="blendTrans(Duration=0.5)" http-equiv="Page-Enter" />
	<meta content="blendTrans(Duration=0.5)" http-equiv="Page-Exit" />
    <link href="../css/style.css" rel="stylesheet" type="text/css" />
    <title></title>

    <script language="javascript" type="text/javascript">
        function getbacktostepone() {
            window.location = "ItemsPopUp.aspx";
        }
        function onSuccess() {
            setTimeout(okay, 2000);
        }
        function onError() {
            setTimeout(getbacktostepone, 2000);
        }
        function okay() {


            window.parent.document.getElementById('btnOkay').click();

        }

        function cancel() {
            var UIMODE = $get('hdnWindowUIMODE').value;
            if (UIMODE == "EDIT")
                window.parent.document.getElementById('ButtonEditCancel').click();
            else
                window.parent.document.getElementById('btnCancel').click();
        }
    </script>

</head>
<body style="margin: 0px; padding: 0px;">
    <form id="form1" runat="server">
    <input type="hidden" value="" runat="server" id="hdnWindowUIMODE" />
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="popup_Container">
        <div class="popup_Body">
            <asp:MultiView ID="MultiViewExpanse" runat="server">
                <asp:View ID="ViewInput" runat="server">
                    Category:&nbsp;
                    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
                    </asp:DropDownList>
                    <br />
                    &nbsp;<center><asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                        CssClass="gridview" DataSourceID="ObjectDataSource1" Height="100px" 
                        Width="250px">
                        <Columns>
                            <asp:TemplateField HeaderText="Items">
                                <ItemTemplate>
                                    <asp:CheckBox ID="CheckBox1" runat="server" />
                                  
                                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("Description") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                        SelectMethod="FindAllByCategory" TypeName="BusinessLogicLayer.ItemFacade">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="DropDownList1" DefaultValue="C001" 
                                Name="categoryID" PropertyName="SelectedValue" Type="String" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                    </center>
                </asp:View>
                
            </asp:MultiView>
        </div>
        <div class="popup_Buttons" align="center">
            <asp:Button ID="btnOkays" Text="Done" runat="server" OnClick="btnOkay_Click" 
                CssClass="ButtonStyle" Height="30px" Width="60px" />
            <asp:Button ID="btnOkay" runat="server" Text="Cancel" OnClientClick="okay()"  
                CssClass="ButtonStyle" Height="30px" Width="60px" />
        </div>
    </div>
    </form>
</body>
</html>
